package ynu.lcy.controller.inner;

import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import ynu.lcy.elememicroserviceserviceclient.service.BusinessFeignClient;
import ynu.lcy.entity.Business;
import ynu.lcy.service.BusinessService;

import javax.annotation.Resource;

/**
 *  商家内部服务，前端不可调用
 * */
@RestController
@RequestMapping("/business/inner")
public class BusinessInnerController implements BusinessFeignClient {

    @Resource
    private BusinessService service;


    @GetMapping("/get")
    @Override
    public Business getById(@RequestParam("businessId") Long businessId) {
        return service.getById(businessId);
    }
}
